<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: 联想
  Date: 2020/3/15
  Time: 21:50
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Layui</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/resources/layui/css/layui.css" media="all">
    <!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->

</head>
<body>
<blockquote class="layui-elem-quote layui-text">
    信息展示
</blockquote>
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
    <legend>活动详情</legend>
</fieldset>

<form class="layui-form layui-form-pane" action="${pageContext.request.contextPath}/teacher/addActivityDetail" method="get">
    <input type="hidden" name="activityNo" value="${activity.activityNo}">
    <input type="hidden" name="activityName" value="${activity.activityName}">

    <div class="layui-form-item">
        <label class="layui-form-label">活动编号</label>
        <div class="layui-input-inline">
            <input type="text" name="activityContactPeople" value="${activityDescription.activityNo}" readonly="true" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
        </div>

        <label class="layui-form-label">活动名称</label>
        <div class="layui-input-inline">
            <input type="text" name="activityContact" value="${activityDescription.activityName}" readonly="true" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">活动概述</label>
        <div class="layui-input-block">
            <textarea id="activityDescribe" name="activityDescribe" value="${activityDescription.activityDescribe}" readonly="true" placeholder="请输入内容" class="layui-textarea"></textarea>
        </div>
    </div>

    <script language="javascript">
        document.getElementById("activityDescribe").value="${activityDescription.activityDescribe}";
    </script>

    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">活动规则</label>
        <div class="layui-input-block">
            <textarea id="activityRule" name="activityRule" value="${activityDescription.activityRule}" readonly="true" placeholder="请输入内容" class="layui-textarea"></textarea>
        </div>
    </div>

    <script language="javascript">
        document.getElementById("activityRule").value="${activityDescription.activityRule}";
    </script>

    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">活动备注</label>
        <div class="layui-input-block">
            <textarea id="activityRequire" name="activityRequire" value="${activityDescription.activityRequire}" readonly="true" placeholder="请输入内容" class="layui-textarea"></textarea>
        </div>
    </div>

    <script language="javascript">
        document.getElementById("activityRequire").value="${activityDescription.activityRequire}";
    </script>

    <div class="layui-form-item">
        <label class="layui-form-label">活动场地</label>
        <div class="layui-input-block">
            <input type="text" name="activitySpace" value="${activityDescription.activitySpace}" readonly="true" autocomplete="off" placeholder="请输入活动场地" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">联系人</label>
        <div class="layui-input-inline">
            <input type="text" name="activityContactPeople" value="${activityDescription.activityContactPeople}" readonly="true" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
        </div>

        <label class="layui-form-label">联系电话</label>
        <div class="layui-input-inline">
            <input type="text" name="activityContact" value="${activityDescription.activityContact}" readonly="true" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
        </div>
    </div>

</form>

<blockquote class="layui-elem-quote layui-text">
    信息展示
    <c:choose>
        <c:when test="${activityDescription.activityPhoto != null}"><!-- 如果 -->
            <h3>存在一张海报</h3>
        </c:when>
        <c:otherwise> <!-- 否则 -->
            <h3>还未添加海报</h3>
        </c:otherwise>
    </c:choose>

</blockquote>
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
    <legend>海报</legend>
</fieldset>
<div class="layui-upload">
    <blockquote class="layui-elem-quote layui-quote-nm" style="margin-top: 10px;">
        预览图：
        <img style="width: auto;height: auto;max-width: 25%;max-height: 25%" src="${activityDescription.activityPhoto}">
    </blockquote>
</div>


<blockquote class="layui-elem-quote layui-text">
    信息展示
    <c:choose>
        <c:when test="${activityDescription.activityAnnex != null}"><!-- 如果 -->
            <h3>存在一份附件</h3>
        </c:when>
        <c:otherwise> <!-- 否则 -->
            <h3>还未添加附件</h3>
        </c:otherwise>
    </c:choose>

</blockquote>
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
    <legend>附件</legend>
</fieldset>
<div class="layui-upload">
    <blockquote class="layui-elem-quote layui-quote-nm" style="margin-top: 10px;">
        查看文件：
        <a href="${pageContext.request.contextPath}/user/downloadActivityDetail?activityNo=${activity.activityNo}&fileType=annex" class="layui-btn">下载活动附件</a>
    </blockquote>
</div>

</body>
</html>
